package com.yuexun.dhdoctor.module.contractmanage.model.impl;




import com.yuexun.dhdoctor.base.BaseEntity;
import com.yuexun.dhdoctor.module.contractmanage.api.ContractManageApi;
import com.yuexun.dhdoctor.module.contractmanage.bean.ConTractManageBean;
import com.yuexun.dhdoctor.module.contractmanage.bean.ContractManageInspectBean;
import com.yuexun.dhdoctor.module.contractmanage.bean.ContractManageInspectDetailBean;
import com.yuexun.dhdoctor.module.contractmanage.bean.ContractManageTestBean;
import com.yuexun.dhdoctor.module.contractmanage.bean.ContractManageTestDetailBean;
import com.yuexun.dhdoctor.module.contractmanage.bean.HospitalizationAdviceBean;
import com.yuexun.dhdoctor.module.contractmanage.bean.HospitalizationRecordBean;
import com.yuexun.dhdoctor.module.contractmanage.bean.InspectBean;
import com.yuexun.dhdoctor.module.contractmanage.bean.OutPatientAdviceBean;
import com.yuexun.dhdoctor.module.contractmanage.bean.OutPatientRecordBean;
import com.yuexun.dhdoctor.module.contractmanage.bean.TestBean;
import com.yuexun.dhdoctor.module.contractmanage.model.IContractManageModel;
import com.yuexun.dhdoctor.util.ApiUtil;

import java.util.Map;

import rx.Observable;

/**
 * Created by work-jx on 2016/7/5.
 */
public class ContractManageModel implements IContractManageModel {
    private ContractManageApi api;

    public ContractManageApi ApiInstance() {
        if (api != null) {
            return api;
        } else {
            return ApiUtil.getInstance().createRetrofitApi(ContractManageApi.class);
        }
    }


    @Override
    public Observable<BaseEntity<ConTractManageBean>> inquireContractedPatientSignBasicInfo(Map<String, String> praise) {
        api = ApiInstance();
        return api.inquireContractedPatientSignBasicInfo(praise);
    }

    @Override
    public Observable<BaseEntity<ContractManageInspectBean>> inquireCheckPageList(Map<String, String> praise) {
        api = ApiInstance();
        return api.inquireCheckPageList(praise);
    }

    @Override
    public Observable<BaseEntity<ContractManageInspectDetailBean>> inquireCheckDetail(Map<String, String> praise) {
        api = ApiInstance();
        return api.inquireCheckDetail(praise);
    }

    @Override
    public Observable<BaseEntity<ContractManageTestBean>> inquireAssayPageList(Map<String, String> praise) {
        api = ApiInstance();
        return api.inquireAssayPageList(praise);
    }

    @Override
    public Observable<BaseEntity<ContractManageTestDetailBean>> inquireAssayDetail(Map<String, String> praise) {
        api = ApiInstance();
        return api.inquireAssayDetail(praise);
    }

    @Override
    public Observable<BaseEntity<OutPatientRecordBean>> inquirePatientDiagnoseHistory(Map<String, String> praise) {
        api = ApiInstance();
        return api.inquirePatientDiagnoseHistory(praise);
    }

    @Override
    public Observable<BaseEntity<HospitalizationRecordBean>> inquireHospitalizationHistory(Map<String, String> praise) {
        api = ApiInstance();
        return api.inquireHospitalizationHistory(praise);
    }

    @Override
    public Observable<BaseEntity<InspectBean>> inquireApplyCheckPageList(Map<String, String> praise) {
        api = ApiInstance();
        return api.inquireApplyCheckPageList(praise);
    }

    @Override
    public Observable<BaseEntity<TestBean>> inquireApplyAssayPageList(Map<String, String> praise) {
        api = ApiInstance();
        return api.inquireApplyAssayPageList(praise);
    }

    @Override
    public Observable<BaseEntity<OutPatientAdviceBean>> inquirePrescriptionInfo(Map<String, String> praise) {
        api = ApiInstance();
        return api.inquirePrescriptionInfo(praise);
    }

    @Override
    public Observable<BaseEntity<HospitalizationAdviceBean>> inquireInstruct(Map<String, String> praise) {
        api = ApiInstance();
        return api.inquireInstruct(praise);
    }
}
